package com.icart.entities;

import javax.persistence.*;

@Entity
@Table(name = "bi_chn", schema = "amp", catalog = "")
public class BiChnEntity {
    private long chnid;
    private Long parentchnid;
    private String chnname;
    private String locatione;
    private Integer workcount;
    private String tel;
    private String addrprovice;
    private String addrcity;
    private String addrregion;
    private String addrblock;
    private String addr;
    private String beginworktime;
    private String endworktime;
    private String postcode;
    private String manager;
    private String mobile;
    private String email;
    private String bank;
    private String bankaccount;
    private String remark;
    private Double lat;
    private Double lon;
    private Integer isbook;
    private Integer isautomet;

    @Id
    @Column(name = "chnid")
    public long getChnid() {
        return chnid;
    }

    public void setChnid(long chnid) {
        this.chnid = chnid;
    }

    @Basic
    @Column(name = "parentchnid")
    public Long getParentchnid() {
        return parentchnid;
    }

    public void setParentchnid(Long parentchnid) {
        this.parentchnid = parentchnid;
    }

    @Basic
    @Column(name = "chnname")
    public String getChnname() {
        return chnname;
    }

    public void setChnname(String chnname) {
        this.chnname = chnname;
    }

    @Basic
    @Column(name = "locatione")
    public String getLocatione() {
        return locatione;
    }

    public void setLocatione(String locatione) {
        this.locatione = locatione;
    }

    @Basic
    @Column(name = "workcount")
    public Integer getWorkcount() {
        return workcount;
    }

    public void setWorkcount(Integer workcount) {
        this.workcount = workcount;
    }

    @Basic
    @Column(name = "tel")
    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    @Basic
    @Column(name = "addrprovice")
    public String getAddrprovice() {
        return addrprovice;
    }

    public void setAddrprovice(String addrprovice) {
        this.addrprovice = addrprovice;
    }

    @Basic
    @Column(name = "addrcity")
    public String getAddrcity() {
        return addrcity;
    }

    public void setAddrcity(String addrcity) {
        this.addrcity = addrcity;
    }

    @Basic
    @Column(name = "addrregion")
    public String getAddrregion() {
        return addrregion;
    }

    public void setAddrregion(String addrregion) {
        this.addrregion = addrregion;
    }

    @Basic
    @Column(name = "addrblock")
    public String getAddrblock() {
        return addrblock;
    }

    public void setAddrblock(String addrblock) {
        this.addrblock = addrblock;
    }

    @Basic
    @Column(name = "addr")
    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    @Basic
    @Column(name = "beginworktime")
    public String getBeginworktime() {
        return beginworktime;
    }

    public void setBeginworktime(String beginworktime) {
        this.beginworktime = beginworktime;
    }

    @Basic
    @Column(name = "endworktime")
    public String getEndworktime() {
        return endworktime;
    }

    public void setEndworktime(String endworktime) {
        this.endworktime = endworktime;
    }

    @Basic
    @Column(name = "postcode")
    public String getPostcode() {
        return postcode;
    }

    public void setPostcode(String postcode) {
        this.postcode = postcode;
    }

    @Basic
    @Column(name = "manager")
    public String getManager() {
        return manager;
    }

    public void setManager(String manager) {
        this.manager = manager;
    }

    @Basic
    @Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Basic
    @Column(name = "email")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Basic
    @Column(name = "bank")
    public String getBank() {
        return bank;
    }

    public void setBank(String bank) {
        this.bank = bank;
    }

    @Basic
    @Column(name = "bankaccount")
    public String getBankaccount() {
        return bankaccount;
    }

    public void setBankaccount(String bankaccount) {
        this.bankaccount = bankaccount;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BiChnEntity that = (BiChnEntity) o;

        if (chnid != that.chnid) return false;
        if (parentchnid != null ? !parentchnid.equals(that.parentchnid) : that.parentchnid != null) return false;
        if (chnname != null ? !chnname.equals(that.chnname) : that.chnname != null) return false;
        if (locatione != null ? !locatione.equals(that.locatione) : that.locatione != null) return false;
        if (workcount != null ? !workcount.equals(that.workcount) : that.workcount != null) return false;
        if (tel != null ? !tel.equals(that.tel) : that.tel != null) return false;
        if (addrprovice != null ? !addrprovice.equals(that.addrprovice) : that.addrprovice != null) return false;
        if (addrcity != null ? !addrcity.equals(that.addrcity) : that.addrcity != null) return false;
        if (addrregion != null ? !addrregion.equals(that.addrregion) : that.addrregion != null) return false;
        if (addrblock != null ? !addrblock.equals(that.addrblock) : that.addrblock != null) return false;
        if (addr != null ? !addr.equals(that.addr) : that.addr != null) return false;
        if (beginworktime != null ? !beginworktime.equals(that.beginworktime) : that.beginworktime != null)
            return false;
        if (endworktime != null ? !endworktime.equals(that.endworktime) : that.endworktime != null) return false;
        if (postcode != null ? !postcode.equals(that.postcode) : that.postcode != null) return false;
        if (manager != null ? !manager.equals(that.manager) : that.manager != null) return false;
        if (mobile != null ? !mobile.equals(that.mobile) : that.mobile != null) return false;
        if (email != null ? !email.equals(that.email) : that.email != null) return false;
        if (bank != null ? !bank.equals(that.bank) : that.bank != null) return false;
        if (bankaccount != null ? !bankaccount.equals(that.bankaccount) : that.bankaccount != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (chnid ^ (chnid >>> 32));
        result = 31 * result + (parentchnid != null ? parentchnid.hashCode() : 0);
        result = 31 * result + (chnname != null ? chnname.hashCode() : 0);
        result = 31 * result + (locatione != null ? locatione.hashCode() : 0);
        result = 31 * result + (workcount != null ? workcount.hashCode() : 0);
        result = 31 * result + (tel != null ? tel.hashCode() : 0);
        result = 31 * result + (addrprovice != null ? addrprovice.hashCode() : 0);
        result = 31 * result + (addrcity != null ? addrcity.hashCode() : 0);
        result = 31 * result + (addrregion != null ? addrregion.hashCode() : 0);
        result = 31 * result + (addrblock != null ? addrblock.hashCode() : 0);
        result = 31 * result + (addr != null ? addr.hashCode() : 0);
        result = 31 * result + (beginworktime != null ? beginworktime.hashCode() : 0);
        result = 31 * result + (endworktime != null ? endworktime.hashCode() : 0);
        result = 31 * result + (postcode != null ? postcode.hashCode() : 0);
        result = 31 * result + (manager != null ? manager.hashCode() : 0);
        result = 31 * result + (mobile != null ? mobile.hashCode() : 0);
        result = 31 * result + (email != null ? email.hashCode() : 0);
        result = 31 * result + (bank != null ? bank.hashCode() : 0);
        result = 31 * result + (bankaccount != null ? bankaccount.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "lat")
    public Double getLat() {
        return lat;
    }

    public void setLat(Double lat) {
        this.lat = lat;
    }

    @Basic
    @Column(name = "lon")
    public Double getLon() {
        return lon;
    }

    public void setLon(Double lon) {
        this.lon = lon;
    }

    @Basic
    @Column(name = "isbook")
    public Integer getIsbook() {
        return isbook;
    }

    public void setIsbook(Integer isbook) {
        this.isbook = isbook;
    }

    @Basic
    @Column(name = "isautomet")
    public Integer getIsautomet() {
        return isautomet;
    }

    public void setIsautomet(Integer isautomet) {
        this.isautomet = isautomet;
    }
}
